import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/memberproduct',
  component: Layout,
  redirect: '/memberproduct/index',
  name: 'memberproduct',
  meta: {
    title: '会员商品',
    icon: 'icon-park-outline:commodity',
  },
  children: [
    {
      path: 'index',
      name: 'memberproductIndex',
      component: () => import('@/views/memberproduct/index.vue'),
      meta: {
        title: '积分商城商品管理',
        menu: false,
        breadcrumb: false,
        activeMenu: '/memberproduct',
      },
    },
    {
      path: 'detail',
      name: 'memberproductDetail',
      component: () => import('@/views/memberproduct/detail.vue'),
      meta: {
        title: '积分商城商品编辑',
        auth: ['permission.browse'],
        menu: false,
        activeMenu: '/memberproduct',
      },
    },
  ],
}

export default routes
